<?php

class Std_RenderHelperObject {

    public static function renderArray($array, $header = null) {
        if (is_array($header) && !is_null($header)) {
            $array = array_merge($array, $header);
        }
        $res = '';
        $res .= '<table>';
        foreach ($array as $row) {
            $res .= '<tr>';
            if (is_array($row)) {
                foreach ($row as $cell) {
                    $res .= '<td>' . $cell . '</td>';
                }
            }
            $res .= '</tr>';
        }
        $res .= '</table>';
        
        return $res;
    }

}